Drop gdk_device_get_position
authorMatthias Clasen <mclasen@redhat.com>
Fri, 14 Aug 2020 01:03:21 +0000 (21:03 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 14 Aug 2020 02:24:06 +0000 (22:24 -0400)
Convert the last user to _gdk_device_query_state
and drop this unused internal api.

gdk/gdkdevice.c
gdk/gdkinternals.h
gdk/win32/gdkdrag-win32.c

index a6a545656bf5bc0b4476c755bc5cc9e71b5b2eef..d812290b9fbdeb7e515889ea07f36709c09a93cf 100644 (file)
@@ -476,25 +476,6 @@ gdk_device_get_property (GObject    *object,
     }
 }
 
-/*
- * gdk_device_get_position:
- * @device: pointer device to query status about.
- * @x: (out): location to store root window X coordinate of @device
- * @y: (out): location to store root window Y coordinate of @device
- *
- * Gets the current location of @device in double precision.
- */
-void
-gdk_device_get_position (GdkDevice *device,
-                         double    *x,
-                         double    *y)
-{
-  g_return_if_fail (GDK_IS_DEVICE (device));
-  g_return_if_fail (device->source != GDK_SOURCE_KEYBOARD);
-
-  _gdk_device_query_state (device, NULL, NULL, x, y, NULL);
-}
-
 /**
  * gdk_device_get_surface_at_position:
  * @device: pointer #GdkDevice to query info to.
index f0a7f6916a9821519dc5308be393e41489ab6fb4..62e7783cbcaca6955cb7829cd30412e6ab4a4b4a 100644 (file)
@@ -265,9 +265,6 @@ GdkGrabStatus gdk_device_grab (GdkDevice        *device,
                                guint32           time_);
 void gdk_device_ungrab        (GdkDevice        *device,
                                guint32           time_);
-void gdk_device_get_position  (GdkDevice        *device,
-                               double           *x,
-                               double           *y);
 int gdk_device_get_n_axes     (GdkDevice       *device);
 gboolean gdk_device_get_axis  (GdkDevice         *device,
                               double            *axes,
index 9bb6f91539c2554f5519454468b8de35d962c70c..73b093307721c977b0665d21ed0a644e7449f9f2 100644 (file)
@@ -1730,7 +1730,7 @@ _gdk_win32_surface_drag_begin (GdkSurface         *surface,
 
   GDK_NOTE (DND, g_print ("_gdk_win32_surface_drag_begin\n"));
 
-  gdk_device_get_position (device, &px, &py);
+  _gdk_device_query_state (device, NULL, NULL, &px, &py, NULL);
   x_root = round (px + dx);
   y_root = round (py + dy);